package com.example.questionnaires.controller;

import com.example.questionnaires.common.Result;
import com.example.questionnaires.service.DashboardService;
import com.example.questionnaires.vo.DashboardVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/dashboard")
public class DashboardController {
    
    @Autowired
    private DashboardService dashboardService;
    
    @GetMapping("/stats")
    public Result<DashboardVO> getStats() {
        return Result.success(dashboardService.getStats());
    }
} 